Socket
Socket
Sign inDemoInstall

uglify-es

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglify-es

JavaScript parser, mangler/compressor and beautifier toolkit for ES6+


Version published
Weekly downloads
1.1M
increased by7.04%
Maintainers
1
Weekly downloads
 
Created

What is uglify-es?

The uglify-es npm package is a JavaScript parser, minifier, compressor, and beautifier toolkit for ES6+ (ECMAScript 2015 and later). It is used to reduce the size of JavaScript files by removing unnecessary characters and optimizing the code.

What are uglify-es's main functionalities?

Minification

This feature allows you to minify JavaScript code, reducing its size by removing whitespace, comments, and other non-essential characters.

const UglifyJS = require('uglify-es');
const code = 'function add(first, second) { return first + second; }';
const result = UglifyJS.minify(code);
console.log(result.code);

Compression

This feature compresses JavaScript code by applying various optimizations, such as removing dead code and inlining functions, to make the code more efficient.

const UglifyJS = require('uglify-es');
const code = 'function add(first, second) { return first + second; }';
const result = UglifyJS.minify(code, { compress: true });
console.log(result.code);

Mangle

This feature renames variables and function names to shorter names, reducing the overall size of the code.

const UglifyJS = require('uglify-es');
const code = 'function add(first, second) { return first + second; }';
const result = UglifyJS.minify(code, { mangle: true });
console.log(result.code);

Beautification

This feature formats the JavaScript code to be more readable, which is useful for debugging and code reviews.

const UglifyJS = require('uglify-es');
const code = 'function add(first, second) { return first + second; }';
const result = UglifyJS.minify(code, { output: { beautify: true } });
console.log(result.code);

Other packages similar to uglify-es

Keywords

FAQs

Package last updated on 08 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc